package emp.entity;

/**
 * @author 叶枫
 * @date 2024/12/18.
 */

public class User {
    private int userId;     // user_id
    private String username; // username
    private String password; // password
    private String role;     // role ('user' or 'admin')

    // Getter 和 Setter 方法
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    // toString 方法（可选）
    @Override
    public String toString() {
        return "User [userId=" + userId + ", username=" + username + ", password=" + password + ", role=" + role + "]";
    }
}

